Generally, the microcontroller and the microprocessor equipped with a CPU core (hereinafter collectively called “microcomputer”) are categorized into a microcomputer to be applied to various actual products and the like for executing a program, as a so-called product version, and a microcomputer having a debug supporting function for debugging a program by using an in-circuit emulator, in addition to a function for executing the program.
FIG. 1 is a schematic block diagram of a conventional microcomputer with a debug supporting function (“debugging microcomputer”). The debugging microcomputer 1 has the CPU 11, debug support unit (DSU) 12, bus controller 13, and incorporated set of memories and peripherals 14. Further, the debugging microcomputer 1 has the dedicated bus 15 that connects the CPU 11 to the debug support unit 12, the command bus 16 that connects the CPU 11 to the bus controller 13, and the data bus 17 that connects the CPU 11 to the bus controller 13 and the incorporated set of memories and peripherals 14. The debug support unit 12 is connected is connected via a tool bus 18 to the in-circuit emulator 2. The bus controller 13 controls an external bus 19.
When debugging, the debug support unit 12 is connected to the in-circuit emulator 2, and the debugging microcomputer 1 is powered on. Various debug settings in the debug support unit 12 are initialized from the in-circuit emulator 2, to execute an actual program by the CPU 11.
In this conventional debugging microcomputer 1, however, the debug support unit 12 and the CPU 11 are supplied with drive power from an external common power supply. Therefore, even when such an attempt is desirable as tracing an action of the CPU 11 just after power throw-in or breaking a program at a head of an initializing routine, if the power is turned off, various debug setting information disappears, with a failure to perform a debug, as a problem.
There is known a method of performing a debug by a pseudo reproduction of actions of a target system including the debugging microcomputer 1 when power is turned on. That is a method of separating a power supply by inserting an adapter between the debugging microcomputer 1 and the target system as a target to be debugged, holding the debugging microcomputer 1 stopped by an external reset input with the power on, and canceling the rest input in synchronism with a re-throw-in of power of the target system. This method however is unable to reproduce an action of the CPU 11 in a transient phase just after power throw-in, resulting in an incomplete debug.